<include file="App/Home/View/Public/header.html"/>
<style>
li{
  list-style: none;
}
 .pass_ybc{ min-height:400px !important;}
 .my_add{ margin-bottom:0px !important;}
 #addNewAddress{ color:#1686cc !important;}
 .raise .ybcoin {
    line-height: 40px;
    width: 868px;
}
#main {
    width: 100%;
    background-color: #f5f5f5;
    min-height: 550px;
}
#account-main {
    padding: 30px 0 0 0;
    background-color: #efefed;
    font-size: 14px;
}
.alert_warning, .alert_orange {
    background-color: #fffaf4;
    border-color: #edd9c8;
    margin: 0px 20px;
    min-height: 50px;
    width:780px;
    height: 70px;
}

.font_orange, .real-auth .mod_bd ul li dl dd .auth_type, .my_table table td span, .my_table table td b, .my_table table td em {
    color: #008fff !important;
}
.alert {
    border: none;
    color: #999;
    padding: 10px 23px;
    line-height: 22px;
}
.raise h2 {
    font-size: 16px;
    line-height: 40px;
    margin-left: 30px;
    color: #008fff;
    padding-top: 8px;
    font-weight: 700;
}
.left {
    float: left;
}
.pass_ybc {
    min-height: 400px !important;
}
.pass_ybc {
    width: 980px;
    min-height: 450px;
    margin-left: 10px;
}
.support_ybc {
    width: 310px;
    min-height: 420px;
    margin-bottom: 30px;
}
#tagContent div.selectTag {
    display: block;
}
 .choose_one {
    line-height: 200%;
    padding-left: 20px;
    border-bottom: 2px solid #008fff;
    color: #000;
    font-size: 16px;
     width: 868px;
  }
  h1, .h1, h2, .h2, h3, .h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: inherit;
    font-weight: 500;
    line-height: 1.1;
    color: inherit;
}


.add_mleft {
    width: 816px;
    margin-left: 50px;
}
.my_add tr th {
    color: #333;
    padding: 10px;
    border-bottom: 1px dotted #ccc;
}
.my_add{
  width: 868px;
}
.my_add tr td {
    color: #333;
    padding: 10px;
    border-bottom: 1px dotted #ccc;
}
input, button, textarea, select {
    vertical-align: middle;
    font: inherit;
}
.my_add .bor_size {
    height: 30px !important;
    line-height: 30px;
    padding: 0 0 0 3px;
}
.my_add .sum {
    border: 1px solid #dddcda;
}
.my_add .confirm {
    width: 100px;
    text-align: center;
    height: 34px;
    line-height: 34px;
    padding: 0;
    border: 0;
    background: #008fff;
    color: #fff;
    font-family: 'Microsoft Yahei';
    font-size: 14px;
    cursor: pointer;
}
.txjl{
  font-size: 16px;
    line-height: 40px;
    margin-left: 30px;
    color: #008fff;
    padding-top: 8px;
    font-weight: 700;
}
.raise_list {
    width: 860px;
    margin-left: 20px;
}
.raise_list th {
    background-color: #f9f9f9;
    color: #999;
    border-top: 2px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
    height: 35px;
    text-align: center;
}
#rmb_out_ok li {
    height: 34px;
    line-height: 34px;
    margin-bottom: 15px;
}
.passContent .tagContent #rollout li label {
    width: 200px;
}
#rmb_out_ok li label {
    padding-left: 40px;
    color: #666;
}
.passContent .tagContent .ybc_con li label {
    width: 200px;
    float: left;
    text-align: right;
}
#rmb_out_ok li input.bor_size {
    height: 30px;
    line-height: 30px;
    padding: 0 0 0 3px;
}

#rmb_out_ok li input {
    height: 16px;
    line-height: 16px;
    padding: 8px 0 8px 3px;
    width: 260px;
}
.passContent .tagContent .ybc_con input {
    width: 320px;
    height: 38px;
    border: 1px solid #e1e1df;
    line-height: 40px;
    padding-left: 2px;
}
.passContent .tagContent #rollout li span {
    margin-left: 5px;
}

.tagContent .ybc_con li span {
    color: #999;
}
.add_list{
  width: 860px;
}
#rmb_out_ok li select {
    height: 30px;
}
#rmb_out_ok li input {
    height: 35px;
    line-height: 16px;
    padding: 8px 0 8px 3px;
    width: 260px;
}
#rmb_out_ok li .addition {
    height: 40px;
    border: 0;
    background: #008fff;
    color: #fff;
    text-align: center;
    line-height: 40px;
    padding: 0;
    cursor: pointer;
    width: 265px;
}
 </style>


<!--主体内容开始-->
<div id="account-main" role="main">
  <div class="container account-content">
    <div class="row">
      <include file="App/Home/View/Public/left.html"/>
      <!--右侧内容开始-->
      <div class="col-xs-9 account-right">
        <div class="raise right clearfix"> 
          <script type="text/javascript" src="js/ajax.js"></script> 
          <script type="text/javascript" src="js/Fnc.js"></script> 
          <script type="text/javascript" src="js/inputFormat.js"></script>
          <div class="ybc_list">
            <div class="ybcoin">
              <h2 class="left">CNY提现</h2>
              <div class="clear"></div>
            </div>
          </div>
        </div>
          <div class="support_ybc pass_ybc" id="verifyon"> 
            <div id="tagContent" class="passContent">
              <div class="tagContent selectTag" id="tagContent0">
                <div class="alert alert_orange m_t_20">
                  <div style=" float:left;"><b class="font_orange">提现说明：</b></div>
                  <div style=" float:left;">
            <p>
	1. 单笔提现限额{$config.withdraw_min}元——{$config.withdraw_max}元；单日累计最大提现限额{$config.withdraw_day}元.
</p>
<p>
	2. 人民币提现处理时间：工作日9：00-16:00，到账时间取决于银行间的处理速度，一般为1-24小时。
</p>
            </div>
          </div>
            <h2 class="choose_one">选择一个提款地址 
            </h2>
            <table class="my_add add_mleft" border="0" cellpadding="0" cellspacing="0" style="margin-left: -3px;">
              <thead>
                <tr align="center">
                  <th>选择</th>
                  <th>地址标签</th>
                  <th>提款地址</th>
                  <th>操作</th>
                </tr>
              </thead>
              <volist name="bank_info" id="vo">
              <thead>
                  <th><input type="radio" value="{$vo.id}" id="bank_id" name="redio" onclick="bank_id()"></th>
                  <th>{$vo.bname}</th>
                  <th>{$vo.bankname}|{$vo.cardnum}|{$vo.cardname}|{$vo.barea_name}|{$vo.aarea_name}</th>
                  <th><a class="link-del" href="javascript:void(0);" onclick="checkSuccess({$vo.id})">删除</a></th>
                 
              </thead>
              </volist>
              
                
              
                        <script>
                    function checkSuccess(_this){
                    $.post("{:U('User/delete')}",{'id':_this},function(data){
                    if(data.status>0){
                      alert(data.info);
                      window.location.reload();
                    }else{
                      alert(data.info);
                      window.location.reload();
                    }
                    });         
                  }
                    function bank_id(){
                      $("#select_bank").val($("#bank_id").val());
                    }
                        </script>
                </table>
                <table id="addNewAddr" class="add_list" border="0" cellpadding="0" cellspacing="0" style="display:none"> 
              <tbody>
                <tr>
                 
                  <td colspan="4" id="newAddress" style="">
                  <div id="rmb_out_ok">
                      <ul class="ybc_con" id="rollout" style="margin-top:10px;">
                        <li>
                          <label>新标签：</label>
                          <input name="new_label" id="new_label" style="color:#030303" placeholder="例：提现卡01" type="text" class="bor_size">
                          <span class="note">个人备注信息</span></li>
                        <li>
                          <label>开户姓名：</label>
                          <input name="name" id="name" style="color:#030303" value="{$auth}" class="loginValue bor_size" disabled="disabled" type="text">       
                          
                          <span class="false" id="accountmsg">与实名认证信息一致不可修改</span> </li>
                        <li>
                          <label>银行名称：</label>
                          <select name="bank" id="bank" class="loginValue" style="color:#030303;width:264px; border:1px solid #e1e1df;">
                            <option selected="selected" value="" style="color:#030303" >请选择银行</option>
                            <option style="color:#030303">工商银行</option>
                            <option style="color:#030303">建设银行</option>
                            <option style="color:#030303">农业银行</option>
                            <option style="color:#030303">中国邮政储蓄银行</option>
                            <option style="color:#030303">交通银行</option>
                            <option style="color:#030303">中国银行</option>
                            <option style="color:#030303">光大银行</option>
                            <option style="color:#030303">中信银行</option>
                            <option style="color:#030303">招商银行</option>
                            <option style="color:#030303">民生银行</option>
                            <option style="color:#030303">兴业银行</option>
                            <option style="color:#030303">平安银行</option>
                            <option style="color:#030303">广发银行</option>
                            <option style="color:#030303">北京银行</option>
                            <option style="color:#030303">华夏银行</option>
                            <option style="color:#030303">上海浦东发展银行</option>
                            <option style="color:#030303">渤海银行</option>
                            <option style="color:#030303">浙商银行</option>
                            <option style="color:#030303">宁波银行</option>
                            <option style="color:#030303">恒丰银行</option>
                            <option style="color:#030303">中国农业发展银行</option>
                          </select>
                          <span class="rePWB" id="bankmsg"></span> 
                          </li>
                        <li>
                          <label>银行卡所在地：</label>
                          <select  id="p1" style="color:#030303;width:130px; border:1px solid #e1e1df;">
                            <option selected="selected" value="" >省份</option>
                            <volist name="areas" id='row'> 
                            <option value="{$row['area_id']}" style="color:#030303">
                              <eq name="row.area_id" value="$list.province">selected="selected"</eq>>
                              {$row['area_name']}
                              </option>
                            </volist>
                          </select>
                          <select id="c1" style=" color:#030303;width:130px; border:1px solid #e1e1df;"  onchange="city();">
                            <option selected="selected" value="">城市</option>
                          </select>
                          <input type="hidden" name="shi" id="shi">
                        </li>
                        <li>
                          <label>银行卡号：</label>
                          <input onkeyup="value=value.replace(/[^\d]/g,'')" name="account" id="account" class="loginValue" style="font-size:14px;font-weight:bold;color:#f60;background:#fff7f2;" type="text">
                          <span class="false" id="accountmsg" style="color:#f00;">银行卡号和开户姓名必须一致，否则无法到账。</span> </li>
						 <li>
                          <label>开户行：</label>
                          <input name="branch" id="bank_branch" style="color:#030303" value="" class="loginValue bor_size" type="text">       
                          
                           </li>
                        <li id="yes_add">
                          <label>&nbsp;</label>
                          <input class="addition"  value="确认添加" type="submit" onclick="insert()">
<script>
function insert(){
$.post("{:U('User/insert')}",{'new_label':$("#new_label").val(),'name':$("#name").val(),'bank':$("#bank").val(),'shi':$("#shi").val(),'account':$("#account").val(),'bank_branch':$("#bank_branch").val()},function(data){
if(data['status']==1){
alert(data['info']);
window.location.reload();
}else{
alert(data['info']);
}
})
}
</script>						  
                       
<script>
  function city(){
    $("#shi").val($("#c1").val());
  }
  $("#p1").change(function(){
  $.post("{:U('User/getCity')}",{'id':$("#p1").val()},function(data){
    $("#c1").empty();
    var area=new Option("请选择","");
    $("#c1").append(area);
    if(data.length>0){
      for(var i=0;i<data.length;i++){
        var option = new Option(data[i]["area_name"], data[i]["area_id"]);  
        $("#c1").append(option);    
    }
    }else{
      $("#c1").append("<option value='0'>没有相应城市信息</option>");
    }
    });         
  });

</script> 

                          
<script>
    $("#bankform").validate({
        rules: {
      new_label:"required",
      
      bank:"required",
      
      province:"required",
      
      city:"required",
      
      account:{required:true,
           rangelength:[16,19]
           }
        },
        messages: {
      
      new_label:"请填写标签",
      
      bank:"请选择银行",
      
      province:"请选择有效省份",
      
      city:"请选择有效城市/区",
      
      account:{required:"请输入银行卡号",
           rangelength:"请输入有效卡号"}
        },
      submitHandler:function(form){
            ajax_submit_form(form)
            return false;
        },
        invalidHandler: function() {  //不通过回调
            return false;
        }
    });
</script>
  <span id="showMsg_address" style="color:red;">最多添加10条提款地址</span> </li>
                      </ul>
                      
                  </div>
                  </td>
                 
                </tr>
                <tr style="display:none;" id="phone_alert" align="right">
                  <td colspan="4"><span style="color:#f00;">系统已拨打您的手机告知验证码，请输入验证码</span>
                    <input class="verify_text" id="phone_code_bank" type="text">
                    <input class="verify" id="add_bankcards" onclick="cnyOut.finaddAddress()" value="确认" type="button"></td>
                </tr>
                </tbody>
            </table>
           
           
            <center>
            <table>
                <tr id="addAddress_tr" align="center">
                  <td colspan="4" class="list" align="center">
                  <eq name="num" value="1"><a href="javascript:void(0);" id="addNewAddress" onclick="addNewAddr();">点击绑定银行卡</a>
                  <else/>
                  <td style="color:red;">最多添加10条提款地址</td>
                  </eq></td>
                </tr>
            </table>
            </center>
            <script>
        function addNewAddr(){
          document.getElementById("addNewAddr").style.display="";//显示
          document.getElementById("addAddress_tr").style.display="none";//隐藏
        }
      </script>
            <h2 class="choose_one">输入要提款的金额<span>(可用余额：<strong>￥{$rmb.rmb}</strong>&nbsp;您的今日可用提现额度：<strong>￥{$limit}</strong>)</span><span style="float:right;margin-right:20px;"><strong id="rmbout_showtips"></strong></span></h2>

           
           <table class="my_add" border="0" cellpadding="0" cellspacing="0">
              <tbody>
                <tr>
                  <td style="position:relative; padding-left:90px;">提款金额
                    <input name="select_bank" id="select_bank" type="hidden">
                    <input style="display:none">
                    <!-- for disable autocomplete on chrome -->
                    <input class="sum bor_size" name="money" id="money"  autocomplete="off" type="text" onkeyup="true_daozhang.value=this.value*(100-{$config['fee']|default='0'})/100" onchange="identity()">
                    </td>
					
                  <td>实际到帐
                    <input class="sum sum_hei bor_size" name="true_daozhang" id="true_daozhang" disabled="disabled" type="text">
                    <span style="color:#008fff;">手续费{$config.fee}%</span></td> 
                   <script>
					function identity(){
					var money=$("#money").val();
					var rmb={$rmb.rmb};
					if(money>rmb){
					alert("您的余额不足");
					$("#money").val("");
					$("#true_daozhang").val("");
					}
					}
					</script> 
                  
                </tr> 
                <tr>
                  <td style=" padding-left:90px;">交易密码
                    <input style="display:none" type="password">
                    <!-- for disable autocomplete on chrome -->
                    <input class="sum bor_size" name="pwdtrade" id="pwdtrade" autocomplete="off" type="password"></td>
                  <td>验证码
                    <input style="display:none" type="password">
                    <!-- for disable autocomplete on chrome -->
                    <input class="sum bor_size" name="code" id="code" autocomplete="off" type="password">
                    <input class="confirm"  value="点击发送" type="button" id="msgt" data-key='off' onclick="sandPhone()"></td>
                </tr>
                <tr>
                  <td></td>
                  <td><input style=" float:right; margin-right:111px;" class="confirm"  value="确认提交" type="button" onclick="withdraw()" />
                  </td>
                </tr>
              </tbody>
            </table>
            <script>
			function withdraw(){
$.post("{:U('User/withdraw')}",{'select_bank':$("#select_bank").val(),'money':$("#money").val(),'true_daozhang':$("#true_daozhang").val(),'pwdtrade':$("#pwdtrade").val(),'code':$("#code").val()},function(info){
if(info['status']==1){
alert(info['info']);
window.location.reload();
}else{
alert(info['info']);
}
});
}

			</script>
			
            <script>
        $("#drawform").validate({
        rules: {
          money:{
            required: true,
            min: 100,
            max: 50000,
            }, 
          pwdtrade:"required", 
          code:"required", 
        },
        messages: {
          money:{
            required: "请填写提现金额",
            min: "提现金额最小100",
            max: "提现金额最大50000",
            },
          
          pwdtrade:"请填写交易密码",
          code:"请填写验证码",
        },
        submitHandler:function(form){
          ajax_submit_form(form)
          return false;
        },
        invalidHandler: function() {  //不通过回调
          return false;
        }
      });
      function sjdz(){
        var fee = {$config.fee};
        var m ;
        
          m = $("#money").val()-$("#money").val()*fee*0.01;
        
        $("#true_daozhang").val(m);
      }
      </script>

            <!--<h2 class="choose_one">{$art.title}</h2>
            <div class="turns Font14"> 
              <input id="cny_outfee" value="0.003" type="hidden">
            {$config.withdraw_warning}
            </div>-->
          </div>
          <!--<div class="tagContent" id="tagContent1">
            
            <form action="{$User/withdraw}" method="post">
              <ul class="ybc_con" id="rollout">
                <li>
                  <label>提现金额：</label>
                  <input style="display:none;">
                  
                  <input style="float:left;" name="number" onkeyup="value=value.replace(/[^\d.]/g,'')" id="num2" value="0" autocomplete="off" type="text">
                  <span class="note left" style=" height:40px; display:table-cell; vertical-align: middle;">转出金额不能小于10元</span>
                  <div class="clear"></div>
                </li>
                <li>
                  <label>交易密码：</label>
                  <input style="display:none;">
                  
                  <input name="pwdtrade" id="pwdtrade2" autocomplete="off" type="password">
                  <span class="note">请输入交易密码</span></li>
                <li>
                  <label>&nbsp;</label>
                  <input class="queding" value="确定" type="submit">
                </li>
              </ul>
              <div class="turns">
                <h2>使用说明</h2>
                <p>1. 提现到元宝理财的同名账户。</p>
                <p>2. 及时到账。</p>
              </div>
            </form>
          </div>-->
        </div>
      </div>
      <div class="ybc_list">
        <div class="ybcoin">
          <h2 class="left txjl">提现记录</h2>
          <div class="clear"></div>
        </div>
        <table class="raise_list" style="border:1px solid #e1e1df;" align="center" border="0" cellpadding="0" cellspacing="0">
          <thead>
            <tr>
              <th>记录ID</th>
              <th>转入账户</th>
              <th>转出数量</th>
              <th>实际到账</th>
              <th>操作时间</th>
              <th>状态</th>
              <!-- <th>操作</th> -->
            </tr>
          </thead>
          <tbody>
            <volist name="draw_info" id="vo">
            <tr id="btc_box" class="btc_new" >
              <td id="btc_id">{$vo.withdraw_id}</td>
              <td id="btc_wallet">{$vo.cardnum}</td>
              <td id="btc_number">{$vo.all_money}</td>
              <td id="btc_fee">{$vo.money}</td>
              <td id="btc_created">{$vo.add_time|date='Y-m-d H:i:s',###}</td>
              <td class="tableEnd" id="btc_status"><eq name="vo.status" value="1">未通过<else/><eq name="vo.status" value="2">通过<else/>审核中</eq></eq></td>
              <!-- <td><eq name="vo.status" value="3"><a href="javascript:void(0);" onclick="chexiao({$vo.withdraw_id});">撤销</a></eq></td> -->
            </tr>
            </volist>
          </tbody>
        </table>
      </div>
    </div>
    <style>
.btc_new,.btc_new td {background: #DDFFDD !important;}#cb_msg_box{background:#B50000;color:#FFF;display:none;text-align:center;padding:0px;}
</style>
<!--    <script type="text/javascript" src="js/tab2.js"></script> 
    <script src="js/form.js"></script> 
    <script src="js/city.js"></script> 
    <script src="js/cnyout.js"></script> -->
<script>
$("document").ready(function(){
    //initProvinceCity($("#p1"),$("#c1"));
    //$('#account').inputFormat('account');
    // $('#money_rmb').inputFormat('amount');
});
</script> 

  </div>
  <div class="clear"></div>
</div>
<script>
    $(".menu14").addClass("uc-current");

    function showTips(id,msg){
        var tips = layer.tips(msg, id, {
            tips: [1, '#fff8db'],
            area: ['400px', '35px']
        });
        $(id).on('mouseout', function(){
            layer.close(tips);
        });
    }
</script>
<script>
function chexiao(id){
    layer.confirm(
    '确定撤销', 
    {btn:['确定','取消']},
    function(){
      $.post("/Home/User/chexiaoByid",{"id":id},function(data){
        if(data.status==0){
            layer.msg(data['info']);
            window.location.reload();
          }else{
            layer.msg(data['info']);
            window.location.reload();
          }
      })
    }
    ),
    function(){
      layer.msg('已取消');
    }
    
}
 function sandPhone(){
        var phone="{$member.phone}";
    //alert(phone);
    var i=120;
        var tid2;
        tid2=setInterval(function(){
            if($("#msgt").attr("data-key")=='off'){
                $("#msgt").attr("disabled",true);
                $("#msgt").removeClass("class");
                $("#msgt").addClass("button again");
                i--;
                $("#msgt").val(i+"秒后可重新发送");
                if(i<=0){
                    $("#msgt").removeAttr("disabled").val("重新发送验证码");
                    $("#msgt").attr("data-key","on");
                }
            }
        },1000);
        
            $.post("{:U('ModifyMember/ajaxSandPhone')}",{'phone':phone},
                    function(d){
                       layer.msg(d.info);
                        if(d.status==1){
                            i=120;
                            $("#msgt").attr("data-key","off");
               }
            });
    }</script>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!--右侧内容结束-->
    </div>
  </div>
</div>
<!--主题内容结束--> 
<include file="App/Home/View/Public/footer.html"/>
